<template>
    <div class="history">
        <el-tabs v-model="activeName" @tab-click="handleClick">
            <el-tab-pane label="法学" name="first">
                <div class="content">
                    <div class="item" v-for="item in 12">
                        <div class="title">
                            {{2022-item}}法律硕士专业学位联考（法学）
                        </div>
                        <div class="btn">
                            <div class="btn-item" @click="startTest(item,2)">法律基础</div>
                            <div class="btn-item" @click="startTest(item,2)">法律综合</div>
                        </div>
                    </div>
                </div>
            </el-tab-pane>
            <el-tab-pane label="非法学" name="second">
                <div class="content">
                    <div class="item" v-for="item in 21">
                        <div class="title">
                            {{2022-item}}法律硕士专业学位联考（非法学）
                        </div>
                        <div class="btn">
                            <div class="btn-item" @click="startTest(item,1)">法律基础</div>
                            <div class="btn-item" @click="startTest(item,1)">法律综合</div>
                        </div>
                    </div>
                </div>
            </el-tab-pane>
        </el-tabs>
    </div>
</template>
<script>
export default {
    data(){
        return{
            activeName:'first'
        }
    },
    methods:{
        handleClick(){
            
        },
        startTest(val,type){
            let paper_name = type==1?(2022-val)+'法律硕士专业学位联考（非法学）':(2022-val)+'法律硕士专业学位联考（法学）'
            this.$sl('paper',{paper_name:paper_name})
            this.$router.push('/fakeTest')
        }
    }
}
</script>
<style lang="less" scoped>
.history{
    width: 100%;
    height: 100%;
    background-color: #fff;
    padding: 50px;
    overflow-y: auto;
    .content{
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        .item{
            margin-top: 24px;
            width: 364px;
            height: 116px;
            background: #fff;
            border: 1px solid #eee;
            box-sizing: border-box;
            border-radius: 5px;
            box-shadow: 0px 7px 8px 0px rgb(0 0 0 / 3%);
            margin-right: 24px;
            padding-left: 30px;
            padding-top: 22px;
        }
        .title{
            font-size: 16px;
            color: #41485D;
            font-weight: bold;
            height: 24px;
        }
        .btn{
            display: flex;
            margin-top: 15px;
            .btn-item{
                height: 28px;
                box-sizing: border-box;
                line-height: 28px;
                padding: 0px 10px;
                color: #268CFF;
                font-size: 12px;
                border: 1px solid #67b7ff;
                border-radius: 4px;
                margin-right: 10px;
                cursor: pointer;
                &:hover{
                    background-color: #67b7ff;
                    color: #fff;
                }
            }
        }
    }
}
</style>